<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/commons/taglibs.jsp" %>
<%@ taglib tagdir="/WEB-INF/tags/simpletable" prefix="simpletable"%>

 
<jsFileName><!--js/pageJS/page_user.js--></jsFileName>
<s:form id="query_user_list_form" name="query_user_list_form" method="post" action="user/list.do">
	<div  class="con_wrap_padding">
		<div class="trans_operate_box clearfix">
			<div class="operate_btns">			
				<a class="btn_short" title="点击新建用户" href="javascript:void(0)" onClick="Ext.milan.pagejs.page_user.showAddUserForm();">新 建</a>
				<%-- 
				<a class="btn_short" title="启用选中的账号" href="javascript:void(0)" onClick="Ext.milan.pagejs.page_user.activiseUsers()">启 用</a>				
				<a class="btn_short" title="禁用选中的账号" href="javascript:void(0)" onClick="Ext.milan.pagejs.page_user.inactivateUsers()">禁 用</a>
				--%>
			</div>
			<div class="trans_type_search">
		    	用户名：<s:textfield name="username" id="username_user" size="10"/>
		    	用户姓名：<s:textfield name="realname" id="realname_user" size="10"/>
		    	部门：<s:textfield name="orgInfo" id="orgInfo_user" size="10"/>
		    	用户类别：<s:select name="category" list="#{'':'请选择','1':'高管','2':'中层','3':'员工'}"></s:select>
		    	用户类别2：<s:select name="userrole" list="#{'':'--请选择--','0':'监督员','1':'高管领导','2':'部长','3':'副部长','4':'主任','5':'副主任','6':'主管','7':'组长','8':'主任助理','10':'员工'}"></s:select>
		    	<a class="btn_short" name="button" id="button" href="javascript:void(0)" title="搜索" onclick="QueryUserListUtils.query()">搜索</a>
		  	</div>   
		</div>
		
	<table id="user_list_Grid_Table" width="98%" class="dhtmlxGrid" imgpath="skins/default/images/dhtmlx/" lightnavigation="true">
		<tr bgcolor="#FFFFFF">
			<td align="center" width="8%" sort="na">序号</td>
			<td align="center" width="10%">用户名</td>
			<td align="center" width="10%">姓名</td>
			<td align="center" width="10%">部门</td>
			<td align="center" width="10%">用户类别</td>
			<td align="center" width="22%">备注</td>
			<%-- <td align="center" width="10%">状态</td>--%>
			<td align="center" sort="na" width="40%">操作</td>
		</tr>
		<c:forEach items="${page.result}" var="item" varStatus="status">
			<tr bgcolor="#FFFFFF">
				<td align="left">${page.thisPageFirstElementNumber + status.index}</td>
				<td align="left" title='${item.username}'>${item.username}</td>
				<td align="left" title='${item.realname}'>${item.realname}</td>
				<td align="left" title='${item.orgInfo}'>${item.orgInfo}</td>
				<td align="left">
					<c:if test="${item.category == '1'}">高管</c:if>
					<c:if test="${item.category == '2'}">中层</c:if>
					<c:if test="${item.category == '3'}">员工</c:if>
				</td>
				<td align="left" title='${item.memo }'>${item.memo }</td>
				<%-- 
				<td align="center">
					<c:if test="${item.state == '1'}"><font color="blue">启用</font></c:if>
					<c:if test="${item.state == '0'}"><font color="red">禁用</font></c:if>
				</td>
				--%>
				<td align="center" valign="middle">
					<a href="#" onClick="Ext.milan.pagejs.page_user.showDetail('${item.userid}')"><img src="skins/default/images/icons/ico-view.gif" />查看</a>&nbsp;
					<a href="#" onClick="Ext.milan.pagejs.page_user.showEditUserForm('${item.userid}')"><img src="skins/default/images/icons/ico-edit.gif" />编辑</a>&nbsp;
					<c:if test="${item.isadmin == 0}">
					<a href="#" onClick="Ext.milan.pagejs.page_user.deleteUser('${item.userid}')"><img src="skins/default/images/icons/ico-delete.gif" />删除</a>&nbsp;
					</c:if>
					<%-- 
					<a href="#" onClick="Ext.milan.pagejs.page_user.showSetPermissionPage('${item.userid}', '${item.userid}')"><img src="skins/default/images/icons/ico-purview.gif" />权限设置</a>&nbsp;
					<a href="#" onClick="Ext.milan.pagejs.page_user.viewUserFinalPermission('${item.userid}', '${item.userid}')"><img src="skins/default/images/icons/ico-purview.gif" />查看权限</a>&nbsp;
					<a href="#" onClick="Ext.milan.pagejs.page_user.resetUserPwd('${item.userid}', '${item.userid}')"><img src="skins/default/images/icons/ico-resetpassword.gif" />重置密码</a>
					--%>
				</td>
			</tr>
		</c:forEach>
		<c:if test="${fn:length(page.result)==0}">
		<tr>
	    	<td colspan="7"><div class="note_red_in_div">系统没有查找到符合条件的数据！</div></td>
	    </tr>
	    </c:if>
	</table>
		<input type="hidden" name="pageNumber" value="${page.thisPageNumber}"/>
		<input type="hidden" name="pageSize" value="${page.pageSize}"/>
		<simpletable:pagingToolbar page="${page}"/>
	</div>
</s:form>
<script type="text/javascript">;
	QueryUserListUtils = {};
	
	/**
	 * 条件查询
	 */
	QueryUserListUtils.query = function() {
		
		//强行设置当前页为第一页
		var currentPage = $("query_user_list_form").pageNo;
		if(currentPage) 
			currentPage.value = 1;
		
		Ext.milan.pagejs.page_user.query();
	};
	
</script>
 


